Skip to content

showcase app consolidation#1097

Draft
PTKu wants to merge 7 commits intodevfrom
3-unify-showcase
Draft

showcase app consolidation#1097
PTKu wants to merge 7 commits intodevfrom
3-unify-showcase

Conversation

@PTKu
Copy link
Copy Markdown
Contributor

@PTKu PTKu commented Apr 1, 2026

Summary

This PR consolidates 31 separate showcase/testing applications — previously scattered across individual library component directories — into a single, unified showcase application at src/showcase/app. This eliminates massive duplication of boilerplate (hardware config, Blazor scaffolding, build artifacts), simplifies the build pipeline, and provides a centralized place for documentation, integration testing, and live feature demonstration.

The unified showcase app includes both the PLC-side Structured Text code and a Blazor Server UI with 43+ documentation pages covering every component and core feature in AXOpen.


Motivation

  • Duplication problem: Each library component maintained its own standalone app/ folder with near-identical scaffolding: hardware config, Blazor host, security setup, data repositories, and build configuration. This resulted in ~1.5M lines of redundant generated/boilerplate code.
  • Maintenance burden: Any change to the showcase infrastructure (e.g., updating the Blazor host, adjusting security, or changing the PLC configuration) had to be replicated across 31+ directories.
  • Testing fragmentation: Integration tests were spread across individual app folders with no unified test surface.
  • Onboarding friction: New contributors had to navigate dozens of nearly identical app folders to understand how components work together.

What Changed

1. Removed Individual App Folders (31 directories, ~1,511 files deleted)

The following library app/ directories were completely removed:

Category Removed Directories
Core/Foundation src/abstractions/app/, src/core/app/, src/data/app/, src/inspectors/app/, src/io/app/, src/probers/app/, src/timers/app/, src/utils/app/, src/integrations/app/, src/simatic1500/app/
Drives src/components.drives/app/, src/components.festo.drives/app/, src/components.rexroth.drives/app/
Robotics src/components.robotics/app/, src/components.abb.robotics/app/, src/components.kuka.robotics/app/, src/components.mitsubishi.robotics/app/, src/components.ur.robotics/app/
Vision src/components.cognex.vision/app/, src/components.keyence.vision/app/, src/components.zebra.vision/app/
Tightening src/components.desoutter.tightening/app/, src/components.rexroth.tightening/app/
Other Components src/components.elements/app/, src/components.pneumatics/app/, src/components.rexroth.press/app/, src/components.dukane.welders/app/, src/components.balluff.identification/app/, src/components.siem.communication/app/, src/components.siem.identification/app/, src/components.abstractions/app/
Template src/template.axolibrary/app/

2. New Unified Showcase App (src/showcase/app/)

PLC Application (src/)

src/showcase/app/src/
├── Foundation/
│   ├── AbstractionsShowcase.st
│   ├── FoundationShowcase.st
│   ├── InspectorsShowcase.st
│   └── IoShowcase.st
├── IO/
│   ├── HwIdentifiers.st
│   ├── Inputs.st / Outputs.st / IoStructures.st
├── ShowcaseContext.st          # Unified context for all showcases
├── configuration.st            # Hardware/PLC configuration
└── program.st                  # Main program entry point

Blazor UI (ix-blazor/showcase.blazor/)

ix-blazor/showcase.blazor/
├── Pages/                          # 43+ documentation pages
│   ├── Core/                       # AxoComponent, AxoTask, AxoSequencer, AxoMessaging, AxoDialogs, ...
│   ├── Foundation/                 # DataExchange, DistributedData, Rendering, Security
│   └── Components/                 # All 20+ hardware component showcases
├── Shared/
│   ├── MainLayout.razor
│   ├── NavMenu.razor               # Expandable navigation with all features
│   ├── TopRow.razor
│   └── Showcase/                   # Reusable showcase UI components
│       ├── AxoStepCard.razor       # Step-by-step guide cards
│       ├── CodeBlock.razor         # Syntax-highlighted code display
│       ├── MaturityBadge.razor     # Component maturity indicators
│       ├── SourceFileLink.razor    # Links to source files
│       └── SourceViewerModal.razor # Modal source code viewer
├── Services/
│   └── CodeSnippetProvider.cs      # Dynamic code snippet loader with line-range support
├── wwwroot/
│   ├── css/momentum.css            # Operon/Momentum design system
│   └── css/tailwind.css
└── Program.cs                      # App configuration & startup

Key features of the Blazor UI:

  • Living documentationCodeSnippetProvider loads real source code from .st and .cs files, supporting line-range extraction and automatic language detection
  • Momentum/Operon styling — Consistent design system matching the Simatic AX visual language
  • Data exchange showcase — Demonstrates all 4 data exchange patterns: AxoDataExchange, AxoDataFragmentExchange, AxoDataPersistentExchange, AxoDataDistributed
  • Security — Roles-based access control with JSON repository

3. Solution File Updates

Solution Change
src/AXOpen.sln Added showcase (PLC) and showcase.blazor (UI) projects; added AXOpen.Data.Distributed.Tests_L4
src/AXOpen.solution.sln Matching updates
src/AXOpen-L1-tests.sln Updated test references
src/AXOpen-L3-tests.sln Updated test references
src/showcase/showcase.sln New — Standalone showcase solution (847 lines, all project references)
src/showcase/app/showcase.blazor.sln New — Blazor-only solution for UI development

4. Build Pipeline Updates (cake/)

cake/BuildContext.cs:

  • Disabled HasApp flag for all 32 library configurations (e.g., ("core", "axopen.core", true, true, true)("core", "axopen.core", true, false, true))
  • Removed app folder paths from GetControllerAxFolders(), GetApplicationAxFolders(), and GetApaxYmlFiles()

cake/Program.cs:

  • Simplified test runner to no longer traverse individual app/ directories
  • Changed folder discovery from checking both app and ax to only ax

5. Documentation Updates (60+ files)

  • Updated all component documentation links to point to the unified showcase app
  • Link pattern changed from ../app/... to ../../showcase/app/...
  • Minor API reference fix in README.md: Entry.Plc.AxoRemoteTasksEntry.Plc.Ctx.AxoRemoteTasks
  • Updated docs across all component categories: core, data, drives, robotics, vision, tightening, pneumatics, inspectors, IO

6. Configuration Changes

Directory.Packages.props:

  • Added Markdig v0.40.0 — Markdown parsing library used by CodeSnippetProvider for documentation rendering in the Blazor UI

Commit History

Hash Message
f98a9b1e feat: Consolidate multiple showcase apps into unified src/showcase/app
1b95939d fix: Resolve PneumaticsShowcase compilation errors
9ba783a1 feat: Add Operon/Momentum CSS styling to showcase Blazor app
c25ac2aa23ee8c14 wip: Iterative development of unified showcase
cb3f2313cad9b227 wip: Build fixes and structure refinements
71babcbde87e844e wip: Further integration work
305899629d200f16 wip: Continued consolidation
1424d2f7 remove app from lib folders
ea4eabf9 rem wip
863b263c asp

Architecture Diagram

BEFORE (31 separate apps):                AFTER (1 unified app):
                                          
src/core/app/          ─┐                 src/showcase/app/
  ├── src/              │                   ├── src/
  ├── ix-blazor/        │                   │   ├── Foundation/
  ├── hwc/              │                   │   │   ├── AbstractionsShowcase.st
  └── apax.yml          │                   │   │   ├── FoundationShowcase.st
                        │                   │   │   ├── InspectorsShowcase.st
src/data/app/          ─┤                   │   │   └── IoShowcase.st
  ├── src/              │                   │   ├── IO/
  ├── ix-blazor/        ├──► CONSOLIDATED   │   ├── ShowcaseContext.st
  ├── hwc/              │    INTO            │   ├── configuration.st
  └── apax.yml          │                   │   └── program.st
                        │                   ├── ix-blazor/showcase.blazor/
src/components.*/app/  ─┤                   │   ├── Pages/ (43+ pages)
  ├── src/              │                   │   ├── Shared/ (layout + components)
  ├── ix-blazor/        │                   │   ├── Services/ (CodeSnippetProvider)
  ├── hwc/              │                   │   └── wwwroot/ (CSS, assets)
  └── apax.yml         ─┘                   ├── hwc/
                                            └── apax.yml

Testing Considerations

  • Verify apax build succeeds for src/showcase/app
  • Verify the Blazor showcase app starts and all 43+ pages render correctly
  • Verify CodeSnippetProvider resolves source files from the correct paths
  • Verify all documentation links in component docs point to valid files
  • Verify cake build pipeline correctly skips removed app folders
  • Run L1 and L3 test suites to confirm no regressions
  • Verify data exchange scenarios (JSON persistence, fragments, distributed) function correctly
  • Confirm no remaining references to deleted app/ paths in solution or project files

Breaking Changes

  • Removed 31 standalone app directories — Any workflow, script, or CI job that references individual src/<component>/app/ paths will need to be updated to use src/showcase/app/ instead.
  • Build configurationHasApp flag is now false for all library components in BuildContext.cs. The build no longer looks for or processes individual app folders.
  • Solution structure — Projects removed from solutions; showcase projects added. IDE users will need to reload solutions.

Risk Assessment

Risk Likelihood Mitigation
Missing showcase coverage for a component Low All 31 original apps were audited; 43+ pages created
Broken documentation links Low All doc links verified post-update
Build pipeline regression Medium Cake scripts updated but need CI validation
Generated code path changes Medium AXSharp connector paths changed; verify axsharp.companion.json

@PTKu PTKu requested a review from TomKovac April 1, 2026 08:50
@PTKu PTKu marked this pull request as draft April 1, 2026 12:52
PTKu added 5 commits April 1, 2026 14:56
- Updated AXSharp.config.json in timers/ctrl to include "UiHostProject": null.
- Updated AXSharp.config.json in traversals/apax to include "UiHostProject": null.
- Updated AXSharp.config.json in utils/ctrl to include "UiHostProject": null.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that component4 and 5 from the removed test app are missing .

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems that component 3 is missing

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems that component 3 and 4 are missing

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gitignore???

Changed PLC to 1815 V41 with NTP
Copy link
Copy Markdown
Collaborator

@TomKovac TomKovac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that some components are missing in library\docs\Component_3-5 especially in Cognex lib and some others. Not sure if it is on purpose as in showcase app there are present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants